<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>倒计时-限时秒杀</title>
    <style>
        #inputValue {
            font-size: 80px;
            width: 1000px;
        }
    </style>
</head>

<body>
    <p>
        <input type="text" id="inputValue" name="some_name" value="">
    </p>
</body>
<script>
    var mytime = 60 * 60 * 60 * 24 * 10;
    var inputText = document.getElementById("inputValue");
    var dd, hh, mm, ss, ms;
    function fun() {
        if (mytime > 0) {
            mytime--;
        }
        dd = Math.floor(mytime / (60 * 60 * 60 * 24));
        hh = Math.floor((mytime - (dd * 60 * 60 * 60 * 24)) / (60 * 60 * 60));
        hh = (hh < 10) ? "0" + hh : hh;
        mm = Math.floor((mytime - (dd * 60 * 60 * 60 * 24) - (hh * 60 * 60 * 60)) / (60 * 60));
        mm = (mm < 10) ? "0" + mm : mm;
        ss = Math.floor((mytime - (dd * 60 * 60 * 60 * 24) - (hh * 60 * 60 * 60) - (mm * 60 * 60)) / 60);
        ss = (ss < 10) ? "0" + ss : ss;
        ms = Math.floor((mytime - (dd * 60 * 60 * 60 * 24) - (hh * 60 * 60 * 60) - (mm * 60 * 60) - (ss * 60)));
        ms = (ms < 10) ? "0" + ms : ms;
        inputText.value = "限时秒杀：" + dd + "天" + hh + ":" + mm + ":" + ss + ":" + ms;
    }
    setInterval("fun()", 10);
</script>

</html>